<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
					xmlns:local="clr-namespace:EdiDialogs.GotoLine"
          
          xmlns:behav="clr-namespace:Edi.Core.Behaviour;assembly=Edi.Core"
          xmlns:conv="clr-namespace:Edi.Core.Converters.MessageType;assembly=Edi.Core"
          xmlns:cmdLabel="clr-namespace:Util.Local;assembly=Util"
          >
	<Style TargetType="{x:Type local:GotoLineView}">
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
    <Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type local:GotoLineView}">
          <ControlTemplate.Resources>
              <conv:CountToVisibilityHiddenConverter x:Key="CountToVisibilityHidden" />
              <conv:MsgTypeToResourceConverter x:Key="MsgTypeToResource" />
          </ControlTemplate.Resources>
            <Border Background="{TemplateBinding Background}"
							BorderBrush="{TemplateBinding BorderBrush}"
							BorderThickness="{TemplateBinding BorderThickness}">

            <Grid Margin="3">
              <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
              </Grid.RowDefinitions>

              <Grid Grid.Row="0" Margin="0,9">
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto" />
                  <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left">
                  <Label Content="{x:Static cmdLabel:Strings.STR_GOTOLINE_LINE_RANGE_LABEL}" Margin="0"/>
                  <Label Content=" " Margin="0"/>
                  <Label Content="{Binding MinMaxRange}" Margin="0" />
                  <Label Content=":" Margin="0"/>
                </StackPanel>

                <TextBox Text="{Binding LineNumberInput, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
                         behav:TextBoxSelect.SelectedText="{Binding SelectedText}"
                         MaxLines="1"
                         MaxLength="10"
                         Grid.Row="1"
                         Name="PART_TxtLineNumber" />
              </Grid>

              <StackPanel Grid.Row="1">
                <StackPanel Visibility="{Binding ListMessages.Count, Converter={StaticResource CountToVisibilityHidden}}" Margin="0,3">
                  <TextBlock Text="{Binding ProblemCaption}"
                             TextWrapping="Wrap" Margin="3" />

                  <ListBox ItemsSource="{Binding ListMessages}" MaxHeight="65"
                           BorderBrush="Transparent"
                           Background="Transparent"
                           Grid.Row="1"
                           VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                    <ListBox.ItemTemplate>
                      <DataTemplate>
                        <StackPanel Orientation="Horizontal" ToolTip="{Binding MessageType}">
                          <Image Source="{Binding CategoryOfMsg, Converter={StaticResource MsgTypeToResource}}"
                                 Width="16" Margin="3" HorizontalAlignment="Left" VerticalAlignment="Center" />
                          <TextBlock Text="{Binding Message}"
                                     Margin="3" HorizontalAlignment="Left" VerticalAlignment="Center" />
                        </StackPanel>
                      </DataTemplate>
                    </ListBox.ItemTemplate>
                  </ListBox>
                </StackPanel>
              </StackPanel>

            </Grid>

          </Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>